
<!--
/**************************************************
* @ operatorfuncquery.jsp
*
* Copyright   2005 Hitrust Technology Inc.
* Developed by SDC, Hitrust.
* All Rights Reserved.
*
* Modify History:
*  v1.00, 2006/02/, Simonyi Peng
*  1) first release
/**************************************************
-->
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ include file="../common.jsp" %>
<%@ taglib uri="/page.util.gs.hitrust.com/taglibs/page" prefix="page"%>

<html>
<head>
<title>操作员权限设定</title>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<!--<LINK href="<%=root%>/css/css.css" type=text/css rel=stylesheet>-->
<LINK href="<%=root%>/css/caigouxitong.css"" type=text/css rel=stylesheet>
<SCRIPT language="JavaScript" src="<%=root%>/js/common.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/string.js"></SCRIPT>

<%

ArrayList ary1 = (ArrayList)request.getAttribute("ary1");
ArrayList ary2 = (ArrayList)request.getAttribute("ary2");
HashMap currary = (HashMap)request.getAttribute("currary");

System.out.println("no null");
%>

<%
String exceptiondesc = (String)request.getAttribute("exception_desc");
%>
<%
if(message == null){
%>

<script language="JavaScript">
	var counter;
	function process(action){
		if(action=='F'){
			operatorfuncform.action = "<%= response.encodeURL(request.getContextPath() + "/A400601.do") %>";
			operatorfuncform.submit();
		
		}else{
            if(confirm("是否确定要修改操作员的权限？")){ 
                operatorfuncform.action = "<%= response.encodeURL(request.getContextPath() + "/A400604.do") %>";
                operatorfuncform.submit();
            }
		}
			
	}
	
	function allsel(num){
		var chkbox = document.getElementsByName("chkbox"+num);
		for(i=0;i<chkbox.length;i++){
			chkbox[i].checked = true;
		}
		document.getElementById('allunsel'+num).checked = false;
	}
	
	function allunsel(num){
		var chkbox = document.getElementsByName("chkbox"+num);
		for(i=0;i<chkbox.length;i++){
			chkbox[i].checked = false;
		}
		document.getElementById('allsel'+num).checked = false;
	
	}
   
     function back(){
   // window.opener.location.reload();
    self.close();
   }
</script>
</head>
<body text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="operatorfuncform" method="post" >
<input type='hidden' name='operid' value='<%=request.getAttribute("operid")%>'>
<p><br></p>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="20"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr height="20">
          <td height="20" width="1" class="mtxt_black">&nbsp;</td>
          <td height="30" width="758" class="mtxt_black">操作员权限设定</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="bg_line" height="2"></td>
  </tr>
</table>
<br>

<table class=bg_table id=tableId	cellspacing=1 cellpadding=0 style="padding-left:5;padding-right:5" width=98% align=center border=0>
			
	<tr>
		<td class="bg_column" width='21%'>操作员帐号</td>
		<td class="bg_row_odd" width='30%'><%=request.getAttribute("operid")%></td>
		<td class="bg_column" width='20%'>操作员姓名</td>
		<td class="bg_row_odd" width='30%'><%=request.getAttribute("opername")%></td>
	</tr>
</table>
<br>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">

	<tr> 
		<td> 
			<table class=bg_table id=tableId	cellspacing=1 cellpadding=0 style="padding-left:5;padding-right:5" width=100% align=center border=0>
				<%
					if(ary1 != null){
				%>
				<TR height=20>
					<TD class="bg_column" align=center colspan='2'>
						运营公司操作功能<br>
						<input type='checkbox' id='allsel1' onclick='allsel(1)'>全选<br>
						<input type='checkbox' id='allunsel1' onclick='allunsel(1)'>取消全选
					</TD>
					<TD align=left class="bg_row_even" colspan='2'>
					<%
						for(int i=0;i<ary1.size();i++){
							GSFunctionBean tBean = (GSFunctionBean)ary1.get(i);
							out.print("<input type='checkbox' name='chkbox1' "+(currary.containsKey(tBean.getGs_func_id())?"checked":"")+" value='" +tBean.getGs_func_id()+ "'>"+tBean.getGs_func_name()+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
							if(i%3==0) out.print("<br>");
						}
					%>
					</TD>
				</TR>
				<%
					}
					if(ary2 != null){
				%>
				<TR height=20>
					<TD class="bg_column" align=center colspan='2'>
						巴士物资操作功能<br>
						<input type='checkbox' id='allsel2' onclick='allsel(2)'>全选<br>
						<input type='checkbox' id='allunsel2' onclick='allunsel(2)'>取消全选
					</TD>
					<TD align=left class="bg_row_odd" colspan='2'>
					<%
						for(int i=0;i<ary2.size();i++){
							GSFunctionBean tBean = (GSFunctionBean)ary2.get(i);
							out.print("<input type='checkbox' name='chkbox2' "+(currary.containsKey(tBean.getGs_func_id())?"checked":"")+" value='" +tBean.getGs_func_id()+ "'>"+tBean.getGs_func_name()+"&nbsp;&nbsp;&nbsp;");
							if(i%3==0) out.print("<br>");
						}
					%>
					</TD>
				</TR>
				<%
					}
				%>				
			</table>
		</td>
	</tr>
</table>
</form>
    <p align="center">  

    <input type="button" value="确定" class="kuang" onclick="process('C')">
    <input type="button" value="关闭" class="kuang" onclick="back()">
    </p>
</body>
<%} %>
</html>